\documentclass[a4paper,spanish]{article}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{caratula}
\usepackage{amsmath}
\usepackage{amscd}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{latexsym}
\usepackage{verbatim}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{caption}
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{hyperref}
\usepackage[tstt]{backnaur}

%probando para los margenes
\usepackage[top= 3cm, bottom= 3cm , left= 2.5cm, right= 2.5 cm]{geometry}


\renewcommand{\bnfpo }{\rightarrow}
\renewcommand{\bnfpn }[1]{#1}

\renewcommand{\tag}[1]{\bnfts{<#1>} \bnfsp }

% encabezados
\newcommand{\norma}[1]{\left|\left|#1\right|\right|}
\parskip=1ex
\pagestyle{fancy}
\pagenumbering{arabic}
%\fancyhf{}
\renewcommand{\headrulewidth}{0.02 cm}
\renewcommand{\footrulewidth}{0 cm}
\fancyhead[L]{Trabajo Pr\'actico - Primera parte}
\fancyhead[R]{Teor\'ia de lenguajes}
\def\septad{\rule{16 cm}{.2 mm}}

\lstset{frame=single}

% comienzo el documento
\begin{document}

	\include{caratula}
	
	\tableofcontents

    \newpage

	\input{introduccion}
	\include{gramatica}
	\include{conclusion}

\end{document}
